const http = require('http')  //commonJS规范
const server = http.createServer((req,res) => {
        res.end(JSON.stringify('hello world'))

})

server.listen(3000, () => {
    console.log('服务已启动在3000端口');
    
});